#include <iostream>
#include <vector>
using namespace std;

#include <iostream>

// 通用模板
template <class T1, class T2>
class MyClass {
    T1 _d1;
    T2 _d2;
public:
    MyClass()
    {
        cout << "MyClass(T1,T2)" << endl;
    }
};

template <>
class MyClass<int,char> {
    int _d1;
    char _d2;
public:
    MyClass()
    {
        cout << "MyClass(int,char)" << endl;
    }
};
// 部分特化,将第二个参数特化为int
template <class T1>
class MyClass<T1,int>
{
    T1 _d1;
    int _d2;
public:
    MyClass()
    {
        cout << "MyClass(T1,int)" << endl;
    }
};
// 两个参数特化为指针类型
template <class T1,class T2>
class MyClass<T1*,T2*>
{
    T1 _d1;
    T2 _d2;
public:
    MyClass()
    {
        cout << "MyClass(T1*,T2*)" << endl;
    }
};
int main() {
    MyClass<int,int> obj1;//MyClass(T1,int)
    MyClass<int,char> obj2;//MyClass(int,char)
    MyClass<int*,int*> obj3;//MyClass(T1*,T2*)
    MyClass<char,int> obj4;//MyClass(T1,int)
    MyClass<char,char> obj5;//MyClass(T1,T2)
    return 0;
}